/*
 * @Descripttion: 
 * @version: 
 * @Author: turingchang
 * @Date: 2020-12-23 15:10:06
 * @LastEditors: turingchang
 * @LastEditTime: 2020-12-25 17:01:00
 */

module.exports = app => {
    const {router,controller} = app;
    const namespace = `/api/${app.config.xsoaHandler.localServerName}/job`;
    const jobRouter = router.namespace(namespace);
    jobRouter.get('/', controller.job.job.get);
    jobRouter.post('/', controller.job.job.add);
    jobRouter.put('/', controller.job.job.edit);
    jobRouter.post('/cancel', controller.job.job.cancel);
    jobRouter.post('/start', controller.job.job.start);
    jobRouter.post('/stop', controller.job.job.stop);
    
    // router.redirect('/news/list','/news');//重定向使用router而不是adminRouter
} 